package com.example.houqin_oa.controller;

import com.example.comment_oa.pojos.rear.Details;
import com.example.comment_oa.pojos.rear.Pos;
import com.example.comment_oa.pojos_vo.LogisticsVo.PosVo;
import com.example.comment_oa.response.AjaxResponse;
import com.example.houqin_oa.service.PosService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Description:采购订单
 * @Author:陈旭良
 * @Documents_And_Settings:liang
 * @Date:2023-02-05 12:41
 * @Entry_Name:my_springcloud_project01cangku
 */
@RestController
@CrossOrigin
@RequestMapping("/houqinOa")
public class PosController {

    @Autowired
    PosService posService;

    //申请订单
    @PostMapping("/pos/AddIndent")
    public AjaxResponse AddIndent(@RequestBody PosVo posVo){
        return AjaxResponse.success(posService.AddIndent(posVo));
    }
    //订单查询
    @PostMapping("/pos/AllPos")
    public AjaxResponse AllPos(@RequestBody Pos pos){
        System.err.println(posService.AllPos(pos));
        return AjaxResponse.success(posService.AllPos(pos));
    }

    //订单查询
    @PostMapping("/pos/allSingle")
    public AjaxResponse allSingle(@RequestBody Pos pos){
        return AjaxResponse.success(posService.conPos(pos));
    }
}
